import requests
from config import headers_web

class LoginApi():
    def __int__(self):
        self.header = headers_web
    @classmethod
    def login(cls,body):
        urlpath = "http://192.168.1.25/ssoserver/login/verifyLogin"
        r = requests.post(url=urlpath, headers=headers_web, json=body)
        return r


if __name__ == '__main__':
    # import json
    # from read_file import read_data
    # from pprint import pprint
    # headers = {
    #     "Content-Type":"application/x-www-form-urlencoded"
    # }
    r = LoginApi.login(body={
    "account": "2008115582",
    "password": "123456",
    "realm": "",
    "platformNumberId": "010",
    "userType": "",
    "parentPlatformNum": ""
    })
    print(r)
    print(r.request.headers)
    print(r.request.url)
    print(r.request.body)
    #print(r.raw)
